package main

import "github.com/hashicorp/consul/api"

func main() {
	consulConfig := api.DefaultConfig()

	consulClient, _ := api.NewClient(consulConfig)

	// 注销服务
	consulClient.Agent().ServiceDeregister("bj38")
}
